CC = gcc
CFLAGS = -Wall -g -O2

#ifeq ($(CC),gcc)
#	LIBS = libudt_pc.a
#else
#	LIBS = libudt_his.a
#endif

#LIBS += -lpthread -lstdc++ -lm

LIBS = -L../../UDT4/src/ -ludt -lpthread -lstdc++ -lm
#LIBS = ../../UDT4/src/libudt.a -lpthread -lstdc++ -lm

SRCS := $(wildcard *.c)
OBJS := $(SRCS:%.c=%.o)

all: udtserver

udtserver: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

clean:
	rm -rf $(OBJS) udtserver
